using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter18
{
	/// <summary>
	/// Example04: Guitar Basics
	/// The high E string on a guitar measures 64.0 cm in length
	/// and has a fundamental frequency of 330 Hz. By pressing down
	/// so that the string is in contact with the first fret, the
	/// string is shortened so that it plays an F note that has
	/// a frequency of 350 Hz. How far is the fret from the neck
	/// end of the string?
	/// 3.7 cm
	/// </summary>
	public class Example04
	{
		public Example04()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			double lambda = 2.0*0.64;
			double freq = 330.0;
			double v  = lambda*freq;
			double lambda2 = v/350.0;
			double newlength = lambda2/2.0;
			result+=Convert.ToString(0.64 - newlength)+"\r\n";
		}
	}
}
